//力扣每日一题
int romanToInt(char* s) 
{
    int cc[26]={0};
    cc['I'-'A']=1;
    cc['V'-'A']=5; 
    cc['X'-'A']=10;
    cc['L'-'A']=50;
    cc['C'-'A']=100;
    cc['D'-'A']=500;
    cc['M'-'A']=1000;
    int len=strlen(s);
    int sum=0;
for(int i=0;i<len;++i)
{
if((i<(len-1)) && cc[s[i]-'A']<cc[s[i+1]-'A'])
    sum=sum-cc[s[i]-'A'];
    else
    sum=sum+cc[s[i]-'A'];
}
return sum;
}